﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Principal;

namespace PServiceBus.Core.Security {
    public class ESBIdentity : IIdentity {
        private bool _isAuthenticated;
        private string _authenticationType = string.Empty;
        private string _name = string.Empty;
        private string _password = string.Empty;

        public ESBIdentity(string name, string password, bool isAuthenticated = false) {
            _name = name;
            _password = password;
            _isAuthenticated = isAuthenticated;
        }

        #region IIdentity Members

        public string AuthenticationType {
            get { return _authenticationType; }
        }

        public bool IsAuthenticated {
            get { return _isAuthenticated; }
            internal set { _isAuthenticated = true; }
        }

        public string Name {
            get { return _name; }
            internal set { _name = value; }
        }

        public string Password { get { return _password; }
            internal set { _password = value; }
        }

        #endregion
    }
}
